<?php $this->load->view('admin/public/head.html', array('js' => array(
'/assets/library/ckplayer/ckplayer.js'
))); ?>
<script>
    var detailInfo = JSON.parse('<?=json_encode($detail)?>');
</script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" ng-controller="admin-stream-detail-controller">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            直播资源管理
            <small>管理您应用的设备、流量等资源</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/home/index"><i class="fa fa-dashboard"></i> 后台首页</a></li>
            <li><a href="/stream/device/index"> 资源列表</a></li>
            <li class="active">资源管理</li>
        </ol>
    </section>

    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_1" data-toggle="tab">设备信息</a></li>
                        <!--
                        <li><a href="#tab_2" data-toggle="tab">播放地址信息</a></li>
                        -->
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab_1">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">设备序列号</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" ng-bind="detail.deviceSerial"></p>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">序列号</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" ng-bind="detail.validateCode"></p>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">设备型号</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" ng-bind="detail.model"></p>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">选择分组</label>
                                    <div class="col-sm-8">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default btn-flat" ng-bind="selectedGroupName"></button>
                                            <button type="button" class="btn btn-default btn-flat dropdown-toggle" data-toggle="dropdown">
                                                <span class="caret"></span>
                                                <span class="sr-only">Toggle Dropdown</span>
                                            </button>
                                            <ul class="dropdown-menu" role="menu">
                                                <li ng-repeat="($index, g) in groupLists"><a ng-click="selectGroup($index)" ng-bind="g.groupName"></a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="deviceName" class="col-sm-2 control-label">直播名称</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" ng-model="detail.deviceName" id="deviceName" placeholder="直播名称">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="deviceName" class="col-sm-2 control-label">直播源地址<br>（HLS协议，高清）</label>
                                    <div class="col-sm-6">
                                        <textarea name="hd" class="form-control" id="urlHdNormal" cols="80" rows="4" ng-model="detail.videoUrlHD"></textarea>
                                    </div>
                                    <div class="col-sm-2">
                                        <button class="btn btn-default" ng-click="viewVideo(detail.videoUrlHD)">高清预览</button>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="deviceName" class="col-sm-2 control-label">直播源地址<br>（HLS协议，流畅）</label>
                                    <div class="col-sm-6">
                                        <textarea name="hd" class="form-control" id="urlpNormal" cols="80" rows="4" ng-model="detail.videoUrlSD"></textarea>
                                    </div>
                                    <div class="col-sm-2">
                                        <button class="btn btn-default" ng-click="viewVideo(detail.videoUrlSD)">标清预览</button>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="deviceName" class="col-sm-2 control-label"></label>
                                    <div class="col-sm-6">
                                        <button class="btn btn-primary" ng-click="save()">保存修改</button>
                                        <button style="margin-left: 50px;" class="btn btn-default" onclick="history.go(-1)">返回列表</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!-- /.tab-pane -->
                        <div class="tab-pane" id="tab_2">
                        </div>
                        <!-- /.tab-pane -->
                    </div>
                    <!-- /.tab-content -->
                </div>
            </div>

        </div>
    </section>

    <div class="modal" id="videoModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">视屏预览{{ videoUrl }}</h4>
                </div>
                <div class="modal-body">
                    <div id="videoPlay" style="width: 100%; height: 350px;"></div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
    '/assets/admin/js/stream/detail.js',
))); ?>
